﻿//  

#region

using System.Windows;
using Microsoft.Practices.Unity;
using pushbomb.composite.core;
using pushbomb.composite.core.Infrastructure;

#endregion

namespace HitTester.Observable
{
    public class ShellViewModel : ViewModelBase
    {
        public ShellViewModel(IFrameworkServiceProvider fs,
                              [Dependency("Shell")] IView view) : base(fs, view)
        {
            View.Loaded += ViewOnLoaded;
        }

        private LogPublisher LogItems
        {
            get { return View.Resources["logHost"] as LogPublisher; }
        }

        private void ViewOnLoaded(object sender, RoutedEventArgs args)
        {
            LogItems.AttachLogger();
        }
    }
}